function upload() {
  wx.chooseImage({
    count: 9,
    sizeType: ['original', 'compressed'],
    sourceType: ['album', 'camera'],
    success: (res) => {
      console.log(res)
      const tempFilePaths = res.tempFilePaths
      for (let i = 0; i < tempFilePaths.length; i++) {
        wx.cloud.uploadFile({
          cloudPath: '/head_url' + new Date().getTime() + "_" + Math.floor(Math.random() * 1000) + ".jpg",
          filePath: tempFilePaths[i],
          success: res => {
            console.log("上传成功", res)
          }
        })
      }
    }
  })
}